﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;


namespace EzyChoice
{
    [Serializable()]
    public class EzcPersonItem: ISerializable
    {
        public EzcItem Item;
        public EzcPerson Person;

        public EzcPersonItem()
        {

        }



        public EzcPersonItem(EzcItem item, EzcPerson person )
        {
            this.Item = item;
            this.Person = person;
        }

        protected EzcPersonItem(SerializationInfo info, StreamingContext context)
        {
            this.Item = (EzcItem)info.GetValue("Item", typeof(EzcItem));
            this.Person = (EzcPerson)info.GetValue("Person", typeof(EzcPerson));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("Item", this.Item);
            info.AddValue("Person", this.Person);
        }
    }
}
